Advanced iOS App Architecture by By René Cacheaux & By René Cacheaux && Josh Berlin & By Josh Berlin && René Cacheaux
Author:By René Cacheaux & By René Cacheaux && Josh Berlin & By Josh Berlin && René Cacheaux
Language: eng
Format: epub
Publisher: Ray Wenderlich
Reusing views on navigation
Reusing views on navigation makes state management harder. Each time you present a new screen, you need to make sure the state is reset back to the original state. The onboarding flow is an example of reusing views on navigation.
OnboardingViewController drives navigation from WelcomeViewController to SignInViewController. As you saw in the Driving Navigation â Combination section above, OnboardingViewController initially shows a WelcomeViewController. OnboardingViewController pushes a SignInViewController onto the navigation stack when the user taps the Sign In button.
You can find the View Controller file in Koober_iOS/Onboarding:
public class OnboardingViewController: NiblessNavigationController { // ... // Child View Controllers let welcomeViewController: WelcomeViewController let signInViewController: SignInViewController let signUpViewController: SignUpViewController // ... func presentWelcome() { pushViewController(welcomeViewController, animated: false) } func presentSignIn() { pushViewController(signInViewController, animated: true) } func presentSignUp() { pushViewController(signUpViewController, animated: true) } }
UINavigationController reuses views when moving backwards. OnboardingViewController holds a reference to the welcome view controller while displaying the sign-in view controller. When the user taps the Back button, the navigation stack doesnât create a new welcome screen.
The onboarding view controller must ensure the welcome screen is in the correct state when the navigation stack pops the sign-in screen.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
API Testing and Development with Postman by Dave Westerveld(2349)
2021 Beginners Guide to Python Programming Language: A Crash Course to Mastering Python in One Hour by Elmer Gary & Elmer Gary(1848)
Learning C# by Developing Games with Unity 2020 by Harrison Ferrone(1674)
Software Architecture for Busy Developers by Stéphane Eyskens(1574)
Machine Learning for Algorithmic Trading by Stefan Jansen(1545)
Hands-On ROS for Robotics Programming by Bernardo Ronquillo Japón(1505)
Delphi GUI Programming with FireMonkey by Andrea Magni(1396)
Game Development Projects with Unreal Engine by Hammad Fozi & Goncalo Marques & David Pereira & Devin Sherry(1338)
Cloud Native with Kubernetes by Alexander Raul(1333)
Software Architecture Patterns for Serverless Systems by John Gilbert(1291)
Automate It with Zapier by Kelly Goss(1287)
Datadog Cloud Monitoring Quick Start Guide by Thomas Kurian Theakanath(1275)
Practical System Programming for Rust Developers by Prabhu Eshwarla(1268)
Practical Node-RED Programming by Taiji Hagino(1258)
Mastering React Test-Driven Development by Daniel Irvine(1247)
Delphi Programming Projects by William Duarte(1228)
Learn Spring for Android Application Development by S. M. Mohi Us Sunnat(1205)
Ghidra Software Reverse Engineering for Beginners by A. P. David(1194)
Developing Multi-Platform Apps with Visual Studio Code by Ovais Mehboob Ahmed Khan & Khusro Habib & Chris Dias(1187)